package com.ddone.service.impl;

import com.ddone.mapper.StockMapper;
import com.ddone.service.StockService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.concurrent.TimeUnit;

/**
 * @author ddone
 * @date 2024/4/6-14:30
 */
@Service
public class StockServiceImpl implements StockService {

    @Resource
    private StockMapper stockMapper;

    @Override
    public Boolean updateStockByProductId(String productId, Integer count) {
        return stockMapper.updateStockByProductId(productId,count)==1;
    }
}
